package com.lpc.carinfo.util;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * Created by lpc on 2016/12/25.
 */

public class SpUtil {

    private static final String SP_NAME = "ME_SETUP";//sp文件名称

    private static final String BOOTTOKEN = "bootToken";//根票据

    public static SharedPreferences getSharedPreferences() {

        return UIUtil.getContext().getSharedPreferences(SP_NAME, Context.MODE_PRIVATE);
    }

    public static void setBootToken(String bootToken) {

        getSharedPreferences().edit().putString(BOOTTOKEN, bootToken).apply();
    }

    public static String getBootToken() {

        return getSharedPreferences().getString(BOOTTOKEN, "");
    }
}
